<template>
  <div class="about">
    <button @click="logout">退出</button>
  </div>
</template>
<script>
export default {
  name: "About",
  data: () => {
    return {
      userInfo: {},
    };
  },
  methods: {
    logout() {
      fetch('/api/logout').then(value => value.json()).then((res) => {
        console.log(res)
      })
    },
  },
  created() {
    window.localStorage.setItem('sub', 'about')
  }
};
</script>
<style lang="scss">
button {
  width: 180px;
  height: 40px;
}
</style>